﻿#pragma once

#include <hacks/base/ev_loop.h>
#include <hacks/base/ev_async.h>
#include <hacks/base/ev_timer.h>
#include <hacks/base/ev_fd.hpp>

namespace hacks {
#define EV_MK_SHARED_MARCO(Clazz) \
        template<typename... Args> \
        inline std::shared_ptr<Clazz> mk_##Clazz(Args&&... args) \
        { \
            return std::make_shared<Clazz>(std::forward<Args>(args)...); \
        }

    EV_MK_SHARED_MARCO(ev_loop)

    EV_MK_SHARED_MARCO(ev_async)

    EV_MK_SHARED_MARCO(ev_timer)

    EV_MK_SHARED_MARCO(ev_file_fd)

    EV_MK_SHARED_MARCO(ev_sock_fd)

}